import request from '@/utils/request'

// 查询客户信息列表
export function listCustomer(query) {
    return request({
      url: '/result/customer/list',
      method: 'get',
      params: query
    })
  }

// 查询客户简要信息列表
export function miniListCustomer(query) {
  return request({
    url: '/result/customer/minilist',
    method: 'get',
    params: query
  });
  //每次从后端获取全部客户信息要缓存到本地
  if(!query){
    localStorage.setItem("customerList", JSON.stringify(response.rows));
  }
}

// 获取客户详细信息
export function getCustomer(id) {
  return request({
    url: '/result/customer/' + id,
    method: 'get'
  })
}